import request from '@/utils/request'

// 获取列表
export const getAdvertisingApi = () => {
    return request({
        url: '/community',
        method: 'get'
    })
}

// 获取状态
export const getAdvApi = () => {
    return request({
        url: '/adv',
        method: 'get'
    })
}

// 获取位置
export const getPlaceApi = () => {
    return request({
        url: '/adv',
        method: 'get'
    })
}

// 获取渲染列表
export const getContentApi = (params) => {
    return request({
        url: '/content/adv',
        method: 'get',
        params
    })
}
// 获取渲染详情 / 数据回显
export const getAdvInfoApi = (id) => {
    return request({
        url: 'content/adv/' + id,
        method: 'get',
    })
}

// 新增
export const addAdvtApi = (data) => {
    return request({
        url: '/content/adv',
        method: 'post',
        data
    })
}
// 删除
export const delAdvtApi = (id) => {
    return request({
        url: '/content/adv/' + id,
        method: 'DELETE',
    })
}
// 编辑
export const editAdvtApi = (data) => {
    return request({
        url: '/content/adv/' + data.id,
        method: 'put',
        data
    })
}

